package leetcode;

public class test3 {
    // 写个方法截取字符串
    public static void main(String[] args) {
        String str = "/orgs";
        String[] split = str.split("/");
        StringBuilder stringBuilder = new StringBuilder();
        int a = split.length;
        int b;
        if(a==4){
             b = --a;
        }else{
            b = a;
        }
        for (int i = 1; i <b ; i++) {
            stringBuilder.append("/"+split[i]);
        }

        System.out.println(stringBuilder);
    }


}
